package com.example.config.demo;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author yuisama
 * @date 2023/02/01 18:35
 **/
@Component
@ConfigurationProperties(prefix = "spring.datasource")
@Data
//这个注解自动编写了 setter和getter方法
public class MySQLConfig {
    private String url;
    private String username;
    private String password;


}

